import { ResponseUtilService } from '@app/response-util';
import { Body, Controller, Post, Req } from '@nestjs/common';
import { DtoPipe } from '../../pipe/dto/dto.pipe';
import { BuyOrderService } from './buy-order.service';
import PageDto from './dto/page.dto';

@Controller('buyOrder')
export class BuyOrderController {
    constructor(
        private readonly service:BuyOrderService
    ){}
    @Post('page')
    async superUserPage(@Body(new DtoPipe({skipMissingProperties : true})) dto:PageDto, @Req() req) {
        const r = await this.service.page(dto)
        return ResponseUtilService.successRes(r)
    }
}
